//
//  LHQsearchTableViewCell.m
//  Music
//
//  Created by dllo on 16/6/13.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "LHQsearchTableViewCell.h"

@implementation LHQsearchTableViewCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.numLabel = [[UILabel  alloc] init];
        self.numLabel.textColor = [UIColor colorWithRed:0.49 green:0.50 blue:0.50 alpha:1.00];
        self.numLabel.font =  [UIFont  fontWithName:@"Helvetica-Oblique" size:10];
        [self.contentView  addSubview:_numLabel];
        
        self.song_name = [[UILabel  alloc] init];
        self.song_name.font =  [UIFont  fontWithName:@"Helvetica-Oblique" size:14];
        [self.contentView  addSubview:_song_name];
        
        self.singer_name = [[UILabel  alloc] init];
        self.singer_name.font =  [UIFont  fontWithName:@"Helvetica-Oblique" size:11];
        self.singer_name.numberOfLines = 0;
        [self.contentView  addSubview:_singer_name];
        self.album_name = [[UILabel  alloc] init];
        self.album_name.font =  [UIFont  fontWithName:@"Helvetica-Oblique" size:11];
        [self.contentView  addSubview:_album_name];
    }
    return self;
    
}
-(void)layoutSubviews
{
    [super layoutSubviews];
    self.numLabel.frame = CGRectMake(10, 25, 20, 10);
    self.song_name.frame = CGRectMake(self.numLabel.frame.origin.x+self.numLabel.frame.size.width, self.numLabel.frame.origin.y-15, Screenwidth-self.numLabel.frame.size.width, 20);
    self.singer_name.frame = CGRectMake(self.song_name.frame.origin.x, self.song_name.frame.origin.y+self.song_name.frame.size.height+5, Screenwidth, 10);
    
    
    
}
-(void)setModel:(LHQlikeModel *)model
{
    if (_model != model) {
        _model = model;
    }
    self.song_name.text = model.name;
    self.singer_name.text = [NSString  stringWithFormat:@"%@-%@",model.singerName,model.albumName];
    
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
